﻿<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:properties="clr-namespace:KBS.FamilyLines.Properties"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="KBS.FamilyLines.Save" Width="Auto">

    <StackPanel>

        <!-- Header -->
        <Border Padding="5,0,5,0" Background="{DynamicResource BackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,0" CornerRadius="5,5,0,0" Height="30">
            <TextBlock Padding="5,0,0,0" Text="{x:Static properties:Resources.SaveAs}" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" FontSize="18" FontWeight="Bold" d:LayoutOverrides="Height" VerticalAlignment="Center" HorizontalAlignment="Left"/>
        </Border>

        <!-- Content -->
        <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
            <Grid Margin="0,0,0,0" Height="Auto" Background="{DynamicResource InputBackgroundBrush}">
                <StackPanel>
                    <Label Margin="5,0,0,0" Foreground="{DynamicResource InputFontColor}" FontWeight="Bold" Content="{x:Static properties:Resources.ChooseWhoToSaveColon}" Height="25"/>
                    
                    <RadioButton IsChecked="True" GroupName="SaveAs" Margin="10,5,0,0" x:Name="Option1" Foreground="Black" HorizontalAlignment="Left">
                        <Label Padding="0" Content="{x:Static properties:Resources.AllPeople}" Foreground="{DynamicResource InputFontColor}"/>
                    </RadioButton>
                    <RadioButton GroupName="SaveAs" Margin="10,5,0,0" x:Name="Option2" Foreground="Black" HorizontalAlignment="Left">
                        <Label Padding="0" Content="{x:Static properties:Resources.CurrentPerson}" Foreground="{DynamicResource InputFontColor}"/>
                    </RadioButton>
                    <RadioButton GroupName="SaveAs" Margin="10,5,0,0" x:Name="Option3" HorizontalAlignment="Left" Foreground="Black">
                        <Label Padding="0" Content="{x:Static properties:Resources.CurrentPersonAndImmediateRelatives}" Foreground="{DynamicResource InputFontColor}"/> 
                    </RadioButton>

                    <StackPanel Orientation="Horizontal" Margin="10,0,0,0" Height="26" Width="Auto">
                        <RadioButton Margin="0,0,5,0" GroupName="SaveAs" x:Name="Option4" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black">
                            <Label Padding="0" Content="{x:Static properties:Resources.CurrentPersonWith}" Foreground="{DynamicResource InputFontColor}"/>
                        </RadioButton>
                        <ComboBox x:Name="AncestorsComboBox" SelectedIndex="0" Width="39" SelectionChanged="Ancestors_SelectionChanged" Height="22">
                            <ComboBoxItem>0</ComboBoxItem>
                            <ComboBoxItem>1</ComboBoxItem>
                            <ComboBoxItem>2</ComboBoxItem>
                            <ComboBoxItem>3</ComboBoxItem>
                            <ComboBoxItem>4</ComboBoxItem>
                            <ComboBoxItem>5</ComboBoxItem>
                        </ComboBox>
                        <Label Margin="0,-2,0,0" Foreground="{DynamicResource InputFontColor}" Content="{x:Static properties:Resources.AncestralAnd}" />
                        <ComboBox x:Name="DescendantsComboBox" SelectedIndex="0" Width="39" SelectionChanged="Descendants_SelectionChanged" Height="22" >
                            <ComboBoxItem>0</ComboBoxItem>
                            <ComboBoxItem>1</ComboBoxItem>
                            <ComboBoxItem>2</ComboBoxItem>
                            <ComboBoxItem>3</ComboBoxItem>
                            <ComboBoxItem>4</ComboBoxItem>
                            <ComboBoxItem>5</ComboBoxItem>
                        </ComboBox>
                        <Label Margin="0,-2,0,0" Foreground="{DynamicResource InputFontColor}" HorizontalAlignment="Left" Content="{x:Static properties:Resources.DescendantGenerations}"/>
                    </StackPanel>
                    
                    <Label Margin="5,0,0,0" Foreground="{DynamicResource InputFontColor}" FontWeight="Bold" Content="{x:Static properties:Resources.Options}" Height="25" VerticalAlignment="Top" HorizontalAlignment="Left"/>
                    <CheckBox x:Name="PrivacySave" Height="16" Margin="10,5,0,0" ToolTip="{x:Static properties:Resources.PrivacyTooltip}" HorizontalAlignment="Left" Foreground="Black">
                        <Label Padding="0" Content="{x:Static properties:Resources.HideLivingPeople}" Foreground="{DynamicResource InputFontColor}"/>
                    </CheckBox>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,10">
                        <Button Content="{x:Static properties:Resources.Save}" x:Name="SaveButton" Click="SaveButton_Click" Margin="10,0,0,0" Width="Auto" MinWidth="60" Height="15" Style="{DynamicResource RedButtonStyle}" />   
                        <Button Content="{x:Static properties:Resources.Cancel}" x:Name="CancelButton" Click="CancelButton_Click" Margin="5,0,0,0" Height="15" Width="Auto" MinWidth="60" />
                    </StackPanel>
              </StackPanel>
            </Grid>
        </Border>

        <!-- Footer -->
        <Grid>
            <Border Background="{DynamicResource BackgroundBrush}" Height="15" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5"/>
        </Grid>
    </StackPanel>
</UserControl>
